package com.zy.stock.service;

import java.util.List;

import com.zy.stock.domain.Pager;
import com.zy.stock.domain.Stock;
import com.zy.stock.dto.StockDto;



public interface StockService {
	
	/**
	 * 根据条件进行分页查询
	 * @param {@link BillDto}
	 * @param start 起始下标
	 * @param end 结束下标
	 * @return List<Ammeter>
	 * */
	public Pager<List<Stock>> findByCase(Pager<StockDto> pager) throws Exception;
	
	/**
	 * 保存股票
	 * @param stock
	 * @return
	 * @throws Exception
	 */
	public Integer save(Stock stock)throws Exception;
	
	public Stock findById(Integer id)throws Exception;
		
	public Integer update(Stock stock)throws Exception;
	
	public void deleteById(Integer id)throws Exception;
	
	public List<Stock> findAll()throws Exception;
	
	public List<Stock> findByCode(String code)throws Exception;
	
	/**
	 * 处理分红请求
	 * @param baseStockNum
	 * @param shareStockNum
	 * @param baseCashNum
	 * @param shareCash
	 * @throws Exception
	 */
	public void dealShare(Integer baseStockNum,Integer shareStockNum,Integer baseCashNum,Double shareCash,Integer stockId)throws Exception;
	
	public void dealUserRlShare(Integer baseStockNum,Integer shareStockNum,Integer baseCashNum,Double shareCash,Integer userRlId)throws Exception;
}
